/**
 * Created by Administrator on 2017/2/14.
 */
$(function () {

// 菜单导航区域
function menu() {
    $('.row>.col-xs-3:nth-child(8)>a').on('click', function () {
        // console.log('222'); 测试大妈
        $('.row>.col-xs-3:nth-last-child(-n+4)').slideToggle();
    })
  }

    function getIndxMenu() {
        $.ajax({
            url:'http://139.199.157.195:9090/api/getindexmenu',
            success:function (res) {
                var html = template('tpl1',res);
                $('section > .row').html(html);
                menu();
            }
        })
    }
    getIndxMenu();

    // 超值折扣推荐部分，根据api获取数据动态渲染至页面上
    function zheKou() {
        $.ajax({
            url:'http://139.199.157.195:9090/api/getmoneyctrl',
            success:function (res) {
                var html = template('tpl2',res);
                $('.mm_shopScroll > .list-group').html(html);
            }
        })
    }
    zheKou();





    // {{# value.productComCount.replace(/[^0-9]/ig,"") }}























    /*function getIndexMenu() {
        $.get("http://139.199.157.195:9090/api/getindexmenu", function (res) {
            var html = template("menuTpl", res);
            $("#menu>.row").html(html);
        });
    }*/




})
